﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="../../Content/Comments.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/ListVIew.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/SubMenuStyles.css" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    
    <script type="text/javascript">
       //--------------------Calcuating the item there is in the shopping cart and saving them in a label---------------------------------
        $(document).ready(function () {
            $.get("/Product/NoOfItemInShopppingCart", function (data) {
                var itemsNo = data;
                $('#CartItem').html(itemsNo);
            });
        });
        //-----------------------------------------------------------------------------------------------------------------
    </script>

</head>
<body>
    <div class="page">
    <!-----------------------Creating the header with the logo and login View ------------------>
        <div id="header">
            <div id="title">
                <h1>Welcome to Eletcrons LTD</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>           
            <!---- Having the menu div calla different view that updates the menu accoring to the user ----------->
            <div id="menucontainer">
                <ul id="menu">
                    @Html.Action("Menu","Website")
                </ul>
            </div>

            <!---------------------------------------------------------------------------->
        </div>
        <div id="main">
         <!------------------------------------------------------------------------------------------->

            <!-- Creating a div that contains the Image and the label that uses how much items the user has -->
            
            <div id="CartDiv" style="float:right">
                <a id="ImageCartLink" href="@Url.Action("ShoppingCart","Product")">
                    <img alt="Your Shopping Cart" src="../../Images/icon_LargeShoppingCart.jpg" width="30px" height="30px" />
                    <label id="CartItem"></label>
                </a>
            </div>
            <br />
            <br />
            <!--------------------------------------------------------------------------------->
            @RenderBody()
        </div>
        <div id="footer">
        </div>
    </div>
</body>
</html>
